package com.fyyg.service.system;

import com.fyyg.dal.system.TBusiConfigurationMapper;
import com.fyyg.dal.user.TBusiAppBannerMapper;
import com.fyyg.interfaces.system.TBusiConfigurationService;
import com.fyyg.model.TBusiAppBanner;
import com.fyyg.model.TBusiConfiguration;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("busiConfigurationService")
public class TBusiConfigurationServceImpl implements TBusiConfigurationService {
	
	@Autowired
	private TBusiConfigurationMapper tBusiConfigurationMapper;
	
	@Autowired
	private TBusiAppBannerMapper tBusiAppBannerMapper;

	@Override
	public List<TBusiConfiguration> selectTBusiConfiguration(int type) {
		return tBusiConfigurationMapper.selectTBusiConfiguration(type);
	}

	@Override
	public TBusiConfiguration selectTBusiConfigurationByName(String name) {
		return tBusiConfigurationMapper.selectTBusiConfigurationByName(name);
	}

	@Override
	public int updateTBusiConfiguration(TBusiConfiguration config) {
		return tBusiConfigurationMapper.updateByPrimaryKeySelective(config);
	}

	@Override
	public List<TBusiConfiguration> findCouponConfiguration(){
		return tBusiConfigurationMapper.findCouponConfiguration();
	}
	
	@Override
	public TBusiConfiguration selectTBusiConfigurationById(int id){
		return tBusiConfigurationMapper.selectTBusiConfigurationById(id);
	}

	@Override
	public int insertAppBanner(TBusiAppBanner ab) {
		return tBusiAppBannerMapper.insert(ab);
	}

	@Override
	public List<Map<String, Object>> findPageAppBannerList(Map<String, Object> parameterMap) {
		return tBusiAppBannerMapper.findPageAppBannerList(parameterMap);
	}

	@Override
	public int findPageAppBannerCount(Map<String, Object> parameterMap) {
		return tBusiAppBannerMapper.findPageAppBannerCount(parameterMap);
	}

	@Override
	public TBusiAppBanner selectAppBannerById(Integer id) {
		return tBusiAppBannerMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateAppBanner(TBusiAppBanner ab) {
		return tBusiAppBannerMapper.updateByPrimaryKeySelective(ab);
	}

	@Override
	public List<TBusiAppBanner> selectBannerByFlag(Integer flag) {
		return tBusiAppBannerMapper.selectBannerByFlag(flag);
	}
	
	
	
	

}
